# loc/financial_tools_page_locators.py
from selenium.webdriver.common.by import By

class FinancialToolsPageLocators:
    """金融工具页面元素定位器"""
    # 子菜单
    SUB_MENU_ITEM_1 = (By.XPATH, '/html/body/div/div/aside/div[2]/nav/ul/li[3]/ul/li[1]/a')
    SUB_MENU_ITEM_2 = (By.XPATH, '/html/body/div/div/aside/div[2]/nav/ul/li[3]/ul/li[2]/a')

    # 计算器表单
    AMOUNT_INPUT = (By.XPATH, '/html/body/div/div/main/div/div/div/div/div[2]/div/form/div[1]/input')
    TERM_INPUT = (By.XPATH, '/html/body/div/div/main/div/div/div/div/div[2]/div/form/div[3]/input')
    CALCULATE_BUTTON = (By.CLASS_NAME, 'btn.btn-primary')

    # 结果弹窗
    # 注意：更稳健的定位方式是使用ID或更具体的class
    RESULT_POPUP_CONFIRM_BUTTON = (By.XPATH, '/html/ body / div[2] / div[2] / div / div / div / div / div / div / div / div[4] / button')
    CALCULATION_RESULT_TEXT = (By.XPATH, '...') # 假设这里有一个显示结果的元素，用于断言